<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Información de Empleados</title>
    </head>
    <body>

        <h1><FONT FACE="Times New Roman" SIZE=8 COLOR=black><b> Empleados </b></FONT></h1>
        

        <form action="./EmpleadoServlet" method="POST">
            <input type="submit" name="action" value="Volver" />
            <table>
                <tr>
                    <td><FONT FACE="Times New Roman" SIZE=3 COLOR=#0101DF><b>DNI</b></td>
                    <td><input type="text" name="DNI" value="${Empleados.DNI}" /></td>
                </tr>
                <tr>
                    <td><FONT FACE="Times New Roman" SIZE=3 COLOR=#0101DF><b>Nombre</b></td>
                    <td><input type="text" name="Nombre" value="${Empleados.Nombre}" /></td>
                </tr>
                <tr>
                    <td><FONT FACE="Times New Roman" SIZE=3 COLOR=#0101DF><b>Apellidos</b></td>
                    <td><input type="text" name="Apellidos" value="${Empleados.Apellidos}" /></td>
                </tr>
                <tr>
                    <td><FONT FACE="Times New Roman" SIZE=3 COLOR=#0101DF><b>Usuario</b></td>
                    <td><input type="text" name="Usuario" value="${Empleados.Usuario}" /></td>
                </tr>
                <tr>
                    <td><FONT FACE="Times New Roman" SIZE=3 COLOR=#0101DF><b> Contrase&ntilde;a </b></td>
                    <td><input type="text" name="Password" value="${Empleados.Password}" /></td>
                </tr>
                <tr>
                    <td><FONT FACE="Times New Roman" SIZE=3 COLOR=#0101DF><b> Departamento </b></td>
                    <td><input type="text" name="Departamento" value="${Empleados.Departamento}" /></td>
                </tr>
                <tr>
                    <td><FONT FACE="Times New Roman" SIZE=3 COLOR=#0101DF><b> Sucursal </b></td>
                    <td><select name="Sucursal">
                            <option type="text" name="Sucursal" value="Soria"> Soria </option>
                            <option type="text" name="Sucursal" value="Teruel"> Teruel </option>
                        </select></td>
                </tr>
                <tr>
                    <td><FONT FACE= "Times New Roman" SIZE=4 COLOR=Green> <b>Opciones</b></td>

                    <td colspan="2">
                        <input type="submit" name="action" value="A&ntilde;adir" />
                        <input type="submit" name="action" value="Editar" />
                        <input type="submit" name="action" value="Borrar" />
                        <input type="submit" name="action" value="Buscar Empleado" />
                        <input type="submit" name="action" value="Buscar todos" />

                    </td>                
                </tr>    


            </table>
            <table>
                <tr>
                    <td> <font color="#FF0000"><b><c:out value="${mensajesERROR}"/></b></font> </td>
                    <td> <font color="#74DF00"><b><c:out value="${mensajesOK}"/></b></font> </td>
                </tr>
            </table>
        </form>        
        <br>
        <table border="5">
            <th><FONT FACE="Times New Roman" SIZE=3> DNI </th>
            <th><FONT FACE= "Times New Roman" SIZE=3> Nombre </th>
            <th><FONT FACE= "Times New Roman" SIZE=3> Apellidos </th>
            <th><FONT FACE= "Times New Roman" SIZE=3> Usuario </th>
            <th><FONT FACE= "Times New Roman" SIZE=3> Password </th>
            <th><FONT FACE= "Times New Roman" SIZE=3> Departamento </th>
            <th><FONT FACE= "Times New Roman" SIZE=3> Sucursal </th>
                <c:forEach items="${allEmpleados}" var="emp">
                <tr>
                    <td>${emp.DNI}</td>
                    <td>${emp.nombre}</td>
                    <td>${emp.apellidos}</td>
                    <td>${emp.usuario}</td>
                    <td>${emp.password}</td>
                    <td>${emp.departamento}</td>
                    <td>${emp.sucursal}</td>
                </tr>
            </c:forEach>
            <style type="text/css"> 
                body{ 
                    background-image: url(http://www.ricardoego.com/word/wp-content/uploads/2013/01/elementos-motivacion.jpg); 
                    background-repeat : no-repeat; 
                    background-attachment : fixed; 
                    background-size: contain;
                    background-position: right;
                } 
            </style>

    </body>
</html>



